<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .banner {
            width: 1000px;
            height: 300px;
            margin: 40px auto;
            background-color: #eee;
            overflow: hidden;
        }

        .a {
            width: 300px;
            height: 100px;
            background-color: #f00;
            animation: a1 1.3s;
        }

        .b {
            width: 300px;
            height: 100px;
            background-color: #ff0;
            animation: b1 1.3s;
        }

        @keyframes a1 {
            0% {
                transform: translateY(-100px);
            }

            100% {
                transform: translateY(0);
            }
        }

        @keyframes b1 {
            0% {
                transform: translateY(200px);
            }

            100% {
                transform: translateY(0);
            }
        }






        .c {
            width: 300px;
            height: 100px;
            background-color: #f00;
            transform: translateY(-100px);
            /* forwards 保留在动画结束的时刻 */
            animation: c1 1.3s forwards;
        }

        .d {
            width: 300px;
            height: 100px;
            background-color: #ff0;
            transform: translateY(200px);
            animation: d1 1.3s 1s forwards;
        }

        @keyframes c1 {
            0% {
                transform: translateY(-100px);
            }

            100% {
                transform: translateY(0);
            }
        }

        @keyframes d1 {
            0% {
                transform: translateY(200px);
            }

            100% {
                transform: translateY(0);
            }
        }
    </style>
</head>

<body>

    <div class="banner">
        <div class="a"></div>
        <div class="b"></div>
    </div>


    <div class="banner">
        <div class="c"></div>
        <div class="d"></div>
    </div>

</body>

</html>